package com.hospital.register.dto.cmn;

import com.alibaba.excel.annotation.ExcelProperty;
import com.hospital.register.validation.groups.InsertValidation;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * Dict
 * </p>
 *
 * @author qy
 */
@Data
public class DictExcelDto {

    @ExcelProperty(value = "id", index = 0)
    @Min(value = 1L, message = "id 非法", groups = InsertValidation.class)
    @NotNull(message = "id 不可为空", groups = InsertValidation.class)
    private Long id;

    @ExcelProperty(value = "上级id", index = 1)
    @Min(value = 1L, message = "上级 id 非法", groups = InsertValidation.class)
    private Long parentId;

    @ExcelProperty(value = "名称", index = 2)
    @NotBlank(message = "名称不可为空", groups = InsertValidation.class)
    private String name;

    @ExcelProperty(value = "值", index = 3)
    @NotBlank(message = "值不可为空", groups = InsertValidation.class)
    private String value;

    @ExcelProperty(value = "编码", index = 4)
    @NotBlank(message = "编码不可为空", groups = InsertValidation.class)
    private String dictCode;

}

